package com.example.web1012.config;

import com.example.web1012.Interceptor.LogInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * @projectName: web10-12
 * @package: com.example.web1012.config
 * @className: WebConfig
 * @author: Berry Peng
 * @description:
 * @date: 2022/10/23 16:30
 * @version: 1.0
 */
@Configuration
public class WebConfig extends WebMvcConfigurerAdapter {
    
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        
        
        registry.addInterceptor(new LogInterceptor()).addPathPatterns("/**").excludePathPatterns("/login.html");
        super.addInterceptors(registry);
    }
}
